package com.health.platform.provider.internetmedicine.controller;

import com.health.platform.common.core.entity.BaseQueryEntity;
import com.health.platform.common.restful.AppResponse;
import com.health.platform.provider.internetmedicine.service.InternetMediService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>互联网医疗Controller</p>
 * <p>创建日期：2021-02-23</p>
 *
 * @author zhou-qf
 */
@RestController
@RequestMapping("internetMedi")
public class InternetMediController {

    @Autowired
    private InternetMediService internetMediService;

    /**
     * 获取中间部分汇总信息
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getSummaryInfo")
    public AppResponse getSummaryInfo(@RequestBody BaseQueryEntity baseQueryEntity){
        return internetMediService.getSummaryInfo(baseQueryEntity);
    }

    /**
     * 获取就诊人次按机构排名
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getVisitsNum")
    public AppResponse getVisitsNum(@RequestBody BaseQueryEntity baseQueryEntity){
        return internetMediService.getVisitsNum(baseQueryEntity);
    }

    /**
     * 获取线上疾病排名
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getDisOnlineNum")
    public AppResponse getDisOnlineNum(@RequestBody BaseQueryEntity baseQueryEntity){
        return internetMediService.getDisOnlineNum(baseQueryEntity);
    }

    /**
     * 获取患者地域及年龄分布
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getPatientAreaAge")
    public AppResponse getPatientAreaAge(@RequestBody BaseQueryEntity baseQueryEntity){
        return internetMediService.getPatientAreaAge(baseQueryEntity);
    }

    /**
     * 获取互联网诊疗开展情况
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getSituationNum")
    public AppResponse getSituationNum(@RequestBody BaseQueryEntity baseQueryEntity){
        return internetMediService.getSituationNum(baseQueryEntity);
    }

    /**
     * 获取线上用药排名
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getMedicationNum")
    public AppResponse getMedicationNum(@RequestBody BaseQueryEntity baseQueryEntity){
        return internetMediService.getMedicationNum(baseQueryEntity);
    }

    /**
     * 获取预约挂号及在线就诊人次趋势
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getNumTrend")
    public AppResponse getNumTrend(@RequestBody BaseQueryEntity baseQueryEntity){
        return internetMediService.getNumTrend(baseQueryEntity);
    }

    // todo 互联网医院实时诊疗情况 等待客户反馈数据来源

    /**
     * 互联网医院实时诊疗情况
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getInternetRealTime")
    public AppResponse getInternetRealTime(@RequestBody BaseQueryEntity baseQueryEntity){
        return AppResponse.success("查询成功", internetMediService.getSeeDoctor(baseQueryEntity));
    }

}
